﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;

namespace A50Socket_Tcp_客户端
{
    class Program
    {
        static void Main(string[] args)
        {

            //创建Socket对象
            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            //链接服务端
            socket.Connect("192.168.0.254",8000);
            //创建连接器对象
            Connecter connecter = new Connecter(socket);
            while (true)
            {
                string input = Console.ReadLine();//获取输入
                connecter.Send(input);//发送给服务端
            }

        }
    }
}
